package com.ms.service.module.analysis;

import com.ms.service.telnet.STelnetCmd;
import com.xpec.c4.service.module.BasicServiceModule;

public class AnalysisModule extends BasicServiceModule{

	@Override
	public void init() {
		super.init();
		registerActionClass(AnalysisAction.class);
		
		AnalysisProcessor.getInstance().setModule(this);
		AnalysisProcessor.getInstance().initRealTimeManager(this);
	}

	@Override
	public boolean startup() {
		AnalysisProcessor.getInstance().InitRealTimeAnalysis();
		AnalysisProcessor.getInstance().OnStartUpRefreshRealTimeAnalysis();
		
		UpdateRealTimeTotalBetTimer taskTimer = new UpdateRealTimeTotalBetTimer();
		taskTimer.setModule(this);
		taskTimer.setCronExpressions("0/30 * * * * ?");
		this.addCronTaskTimer(taskTimer);
		
		return super.startup();
	}

	@Override
	public void shutdown() {
		super.shutdown();
	}
	

	@Override
	public void procTelnetCommand(STelnetCmd obj) {
		
	}
}
